package file;

import java.io.File;

public class FileDemo1 {
    public static void main(String[] args) {
       // File  file = new File("D:\\jsd2411\\name.txt");
        //File  file = new File("D:/jsd2411/name.txt");
        //File  file = new File("name.txt");
        File file = new File("./name.txt");
        System.out.println("File name: " + file.getName());
        System.out.println("File path: " + file.getAbsolutePath());
        System.out.println("File is directory: " + file.isDirectory());
        System.out.println("File exists: " + file.exists());
    }
}
